package com.tj.admin.auth.enums;

/**
 * xianengfei
 */
public enum AdminStatusEnum {
    normal(0, "正常"),
    screen(1, "禁用");

    private Integer type;

    private String desc;

    AdminStatusEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public AdminStatusEnum setType(Integer type) {
        this.type = type;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public AdminStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }


    public static AdminStatusEnum getEnumByType(Integer type) {
        AdminStatusEnum adminTypeEnum = null;
        for (AdminStatusEnum e : AdminStatusEnum.values()) {
            if (e.getType().equals(type)) {
                adminTypeEnum = e;
            }
        }

        return adminTypeEnum;
    }

}
